package com.salton123.whiteboard.model.bean

import android.graphics.Bitmap
import com.salton123.whiteboard.Constant
import com.salton123.whiteboard.model.record.IRecord

/**
 * User: wujinsheng1@yy.com
 * Date: 2020/5/22 19:05
 * ModifyTime: 19:05
 * Description:
 */
data class WhiteBoardData(
        @BoardType var boardType: Int = BoardType.BOARD_TYPE_STROKE,
        @StrokeType var strokeType: Int = StrokeType.STROKE_TYPE_GRAFFITO, //线条边框类型
        var strokeRecordList: ArrayList<IRecord> = ArrayList(),
        var strokeRedoList: ArrayList<IRecord> = ArrayList(),
        var previewThumbnail: Bitmap? = null,
        var backgroundColor: Int = Constant.DEFAULT_DEFAULT_BACKGROUND_COLOR,
        var backgroundBitmap: Bitmap? = null,
        var curRecord: IRecord? = null,
        var selectedRecord: IRecord? = null
) {
    fun isEraseMode(): Boolean {
        return boardType == BoardType.BOARD_TYPE_ERASER
    }

    fun isSelectedMode(): Boolean {
        return boardType == BoardType.BOARD_TYPE_SELECTED
    }

    fun isStrokeMode(): Boolean {
        return boardType == BoardType.BOARD_TYPE_STROKE
    }
}